package com.jiyun.job;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class DemoJob {
    /**
     * 定时任务方法
     */
    @Scheduled(cron = "0/3 * * * * ?")//设置定时任务的执行策略
    public void scheduled() {
        log.debug("定时任务执行了...");
    }
}
